<script src="../../routers/admin.js"></script>{% extends 'layout.html'%}
{% block title%}用户列表{%endblock%}
{% block body%}


<table class="table table-hover table-striped">
    <tr>
        <td>Id</td>
        <td>用户名</td>
        <td>密码</td>
        <td>是否管理员</td>
        <td>操作</td>
    </tr>
    {% for user in users %}
    <tr>
        <td>{{user._id.toString()}}</td>
        <td>{{user.userName}}</td>
        <td>{{user.passWord}}</td>
        <td>{{user.isAdmin}}</td>
        <td>
            <a href="/admin/user/change?id={{user._id.toString()}}">编辑</a>||
            <a href="/admin/user/delete?id={{user._id.toString()}}">删除</a>
        </td>
    </tr>
    {% endfor%}
</table>
<nav aria-label="...">
    <ul class="pager">
        <li><a href="/admin/user?page={{page-1}}">上一页</a></li>
        {{page}}/{{maxPage}}
        <li><a href="/admin/user?page={{page+1}}">下一页</a></li>
    </ul>
</nav>

{% endblock%}